﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;

namespace COC.Network
{
    public class NetworkListener
    {
        UnityEngine.Network network;
        public bool isConnect()
        {
#if UNITY_EDITOR

            if (UnityEngine.Network.player.ipAddress.ToString() != "127.0.0.1")
            {

                return true;

            }

#endif

#if UNITY_IPHONE

    if (iPhoneSettings.internetReachability == iPhoneNetworkReachability.ReachableViaWiFiNetwork)

    {

        return true;

    }

#endif

#if UNITY_ANDROID

            if (iPhoneSettings.internetReachability == iPhoneNetworkReachability.ReachableViaWiFiNetwork)
            {

                return true;

            }

#endif

#if (!UNITY_IPHONE && !UNITY_ANDROID)

    if (Network.player.ipAddress.ToString() != "127.0.0.1")

    {

        return true;

 

    }

#endif
            return false;
        }


    }
}
